/**
 * Created with CLion.
 * Description: 
 * User: loong
 * Date: 2024/6/12
 * Time: 14:27
 */

#ifndef GAMEUI_H
#define GAMEUI_H
#include "CardUi.h"
#include "Game.h"
#include "Global.h"
using namespace std;
namespace Upgrade {
    class HandCardArea;
    class TrumpSelect;

    class GameUi : public QWidget
    {
        Q_OBJECT

    public:
        GameUi(const GameSPtr & _game, const PlayerSPtr & _player);
    signals:

    public slots:

    private:
        void InitUi();

        void InitEvent();

        void InitWidget();

        void Update(const PlayerSPtr & _player, const CardSPtr & _card);

        // 检测出牌是否符合
        void CheckDeal();

        void UpdateOrderFunction(CardSuit _currentSuit);
    private:
        GameSPtr       game_ {nullptr};
        PlayerSPtr     player_ {nullptr};
        TrumpSelect *  trump_select_ {nullptr};
        HandCardArea * hand_card_area_ {nullptr};

        static QList<CardSuit> suit_order_;
    };

}// namespace Upgrade

#endif//GAMEUI_H
